 $(document).ready(function() {
	<!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> 
	var swfVersionStr = "10.0.0";
	<!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
	var xiSwfUrlStr = "playerProductInstall.swf";
	var flashvars = {};
	var params = {};
	params.quality = "high";
	params.bgcolor = "#ffffff";
	params.allowscriptaccess = "sameDomain";
	params.allowfullscreen = "true";
	
	var attributes = {};
	attributes.id = "preload";
	attributes.name = "preload";
	attributes.align = "middle";
	swfobject.embedSWF(
		"ServerLite.swf?v="+Game.versionstr, "flashContent", 
		"0", "0", 
		swfVersionStr, xiSwfUrlStr, 
		flashvars, params, attributes);

$("#loadDiv").each(function(i,o){
         //$(o).css("left",(($(document).width())/2-(parseint($(o).width())/2))+"px");
         //$(o).css("top",(($(document).height())/2-(parseint($(o).height())/2))+"px");
        })

 });

 function showConnectSuc(){
	var obj = swfobject.getObjectById("preload");
	var code = swfobject.getQueryParamValue("code");
	var src = swfobject.getQueryParamValue("src");
	code = unescape(code);
	code = unescape(code);
	var paras = {src:src,code:code,uid:'',recomId:'',isApp:false,version:Game.versionstr,logoBarId:'logoBar1.png'};
	obj.loginOthersFunc(paras);
 }

 function loadMainPage(){
	$("#loadDiv").fadeOut("fast",function(){
		$(this).remove();
		var obj = swfobject.getObjectById("preload");
		$(obj).css({ width: "790", height: "570", visibility:"visible" });
		$(obj).fadeIn("normal");
		});	
 }

 function loginFail(errorMsg){
	$("#loadDiv").empty();
	$("#loadDiv").append('<div><img src="img/error.png"></div><span class="pass_reg_generalerror" id="pass_login_generalerror">'+errorMsg+"</span>");
 }